{% extends "seller/base.html" %}

{% block title %}
    商品列表页
{% endblock %}

{% block label %}
     所有订单
{% endblock %}

{% block content %}
    <table class="table">
        <thead>
            <tr>
                <th>订单编号</th>
                <th>订单商品</th>
                <th>商品数量</th>
                <th>收货地址</th>
                <th>收货人</th>
                <th>价格</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
            {% for order in store_order%}
            <tr>
                <td>{{ order.order_id.order_number }}</td>
                <td>{{ order.goods_name }}</td>
                <td>{{ order.goods_count }}</td>
                <td>河北省张家口市桥南区999号999室</td>
                <td>{{ order.order_id.order_user.username }}</td>
                <td>{{ order.goods_total_price }}.$</td>
                <td>
                    {% ifequal order.order_status 0 %}
                        <a class="btn btn-facebook btn-user" type="button">提醒支付</a>
                    {% endifequal %}
                    {% ifequal order.order_status 1 %}
                        <a href="/Seller/change_order/?order_id={{ order.id }}&order_status=2" class="btn btn-facebook btn-user" type="button">收款发货</a>
                        <a class="btn btn-facebook btn-user" type="button">修改地址</a>
                    {% endifequal %}
                    {% ifequal order.order_status 2 %}
                        <a class="btn btn-facebook btn-user" type="button">提醒确认收货</a>
                    {% endifequal %}
                </td>
            </tr>
            {% endfor %}
        </tbody>
        <tfoot></tfoot>
    </table>
    <ul style="float: right; margin-right: 100px;" class="pagination">
        {% for p in all_goods.page_range %}
            <li class="paginate_button page-item previous">
                {% ifequal status '1'%}
                    <a class="page-link" href="/goods_list/{{ p }}/1/">{{ p }}</a>
                {% else %}
                    <a class="page-link" href="/goods_list/{{ p }}/0/">{{ p }}</a>
                {% endifequal %}
            </li>
        {% endfor %}
    </ul>
{% endblock %}